<!DOCTYPE html> 
<html>
    <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- -->
            <script src="v.js"></script>
    </head>
    <body>
        
            <div id="app-5">
            <p>{{ message }}</p>
            <button @click="reverseMessage">逆转消息</button>
            </div>
            <script>
                var app5 = new Vue({
                    el: '#app-5',
                    data: {
                        message: 'Hello Vue.js!'
                    },
                    methods: {
                        reverseMessage: function () {
                            this.message = this.message.split('').reverse().join('');
                            console.log(this.message);
                        }
                    }
                })
            </script>
    </body>
</html>